import { Injectable } from '@angular/core';
import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http';

import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class RequestApiService {

  constructor(private http: HttpClient) { }

  getProductAttribute(productId: number): Observable<{}> {
    const url = `/erp/product/cls/findByProdClsId/${productId}`;
    return this.http.get(url);
  }

  /**
   * 获取左侧导航数据
   */
  getMenus(): Observable<HttpResponse<any>> {
    const url = '/erp/user/menu/treepriv';
    return this.http.get<any>(url);
  }
}
